<?php
/* @var $this Controller */
$this->beginWidget('bootstrap.widgets.TbBox', array(
	'title' => array($this->projectName => array('project/schema'), '计划任务'),
	'headerIcon' => 'icon-time',
));
$this->widget('bootstrap.widgets.TbAlert', array(
	'block' => true, // display a larger alert block?
	'fade' => true, // use transitions?
	'closeText' => '×', // close link text - if set to false, no close link is displaye));
	'alerts' => array('success', 'warning', 'error'),
));
$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
	'id' => 'horizontalForm',
	'type' => 'horizontal',
)); /* @var $form TbActiveForm */
?>
<div class="row-fluid">    	
	<table class="table table-bordered">
		<tr><th>任务名称</th><th>当前状态</th><td>状态变更</td></tr>
		<?php foreach ($model->tasks as $task): ?>
		<tr>
			<td>
				<label class="checkbox">
					<?php echo CHtml::checkBox(CHtml::activeName($model, 'status[' . $task->name . ']'), !$task->isSubmitAble, array('value' => 'submit', 'disabled' => !$task->isSubmitAble)); ?>
					<?php echo $task->label; ?>
				</label>
			</td>
			<td><?php echo $task->statusLabel; ?></td>
			<td><?php echo $task->statusTime; ?></td>
		</tr>
		<?php endforeach; ?>
	</table>
</div>
<div class="row-fluid">
	<?php
	$this->widget('bootstrap.widgets.TbButton', array(
		'buttonType' => 'submit',
		'type' => 'primary',
		'label' => '提交重建',
	));
	?>
</div>
<?php 
$this->endWidget();
$this->endWidget();
